#include <stdio.h>
int count = 0;
int list[1024] = { 0, 1 };

void f(int n)
{
    int i, c;
    if (list[n]) //如果已经被记录则直接添加
    {
        count += list[n]; 
        return;
    }
    count++;
    for (i = 1; i <= n / 2; i++)
    {
        c = count;
        f(i);
        list[i] = count - c; //记录该数结果，避免后续重复递归
    }
}

int main(int argc, char const *argv[])
{
    int n;
    scanf("%d", &n); 
    f(n);
    printf("%d", count);
    return 0;
}
